﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using DataAnnotationsExtensions;
using System.Web.Mvc;

namespace BenzInfo.Hockey.Grenadiers.Models
{
    [Table("Events")]
    public class Event : Audit
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [StringLength(100, MinimumLength = 2)]
        [Display(Name = "DisplayTitleEN", ResourceType = typeof(Resources.Models.Event))]
        public string TitleEN { get; set; }

        [Required]
        [StringLength(100, MinimumLength = 2)]
        [Display(Name = "DisplayTitleFR", ResourceType = typeof(Resources.Models.Event))]
        public string TitleFR { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        [Display(Name = "DisplayContentEN", ResourceType = typeof(Resources.Models.Event))]
        public string ContentEN { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        [Display(Name = "DisplayContentFR", ResourceType = typeof(Resources.Models.Event))]
        public string ContentFR { get; set; }

        [Required]
        [Display(Name = "DisplayDateStart", ResourceType = typeof(Resources.Models.Event))]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd HH:mm}")]
        public DateTime DateStart { get; set; }

        [Required]
        [Display(Name = "DisplayDateEnd", ResourceType = typeof(Resources.Models.Event))]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd HH:mm}")]
        public DateTime DateEnd { get; set; }
    }
}